package isva;

import com.google.inject.Guice;
import com.google.inject.Injector;
import org.dormi.learn.promotion.model.PromotionResult;
import org.dormi.learn.promotion.api.PromotionService;
import org.dormi.learn.promotion.model.Member;
import org.dormi.learn.promotion.model.Order;
import org.dormi.learn.promotion.model.OrderLine;
import org.dormi.learn.promotion.model.Promotion;
import org.dormi.learn.promotion.model.Sku;

/**
 * add description here
 *
 * @author : dormi330
 * @version : 1.0
 */
public class Test1 {

    public static void main(String[] args) {
        Injector injector = Guice.createInjector(new IsvAModule());

        PromotionService service = injector.getInstance(PromotionService.class);
        Member member = injector.getInstance(Member.class);
        Sku sku = injector.getInstance(Sku.class);
        OrderLine orderLine = injector.getInstance(OrderLine.class);
        Order order = injector.getInstance(Order.class);
        Promotion promotion = injector.getInstance(Promotion.class);

        System.out.println("aa");


        PromotionResult result = service.apply(order, promotion, null);
        System.out.println(result);
    }
}
